Repository navigation
fix gitversion to not recompute version from sdist - #316
Merged
hameerabbasi merged 3 commits intoFeb 10, 2026
Merged
Conversation
Contributor
Author
Contributor
Author
|
Contributor
Author
|
looks like |
lucascolley
commented
Feb 10, 2026
lucascolley
left a comment
Contributor
Author
There was a problem hiding this comment.
that doesn't help
Traceback (most recent call last):
File "/Users/lucascolley/ghq/github.com/scipy/scipy/subprojects/uarray/tools/gitversion.py", line 23, in <module>
main()
~~~~^^
File "/Users/lucascolley/ghq/github.com/scipy/scipy/subprojects/uarray/tools/gitversion.py", line 11, in main
version_module = __import__(str(source_version_path.absolute()))
ModuleNotFoundError: No module named '/Users/lucascolley/ghq/github'
hameerabbasi
force-pushed
the
sdist-existing-v
branch
from
February 10, 2026 15:37
449de0b to
bef7bf5
Compare
Contributor
Author
|
perhaps import importlib.util
spec = importlib.util.spec_from_file_location(
"version_module",
source_version_path,
)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
print(module.__version__) |
Collaborator
That worked, thanks! I found the docs at about the same time as you! https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly |
lucascolley
commented
Feb 10, 2026
Collaborator
|
Hmm, I was fairly sure that |
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
Collaborator
|
Imma merge this early to unblock you; wheels seem to be producing for all the platforms. |
Contributor
Author
|
thanks Hameer :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

hopefully the last one needed @hameerabbasi 😅